import hyRequest from '..'
import type { IAccount } from '@/types/index'

// 登录模块相关接口
export function accountLoginRequest(account: IAccount) {
  return hyRequest.post({
    url: '/login',
    data: account
  })
}
// 获取角色权限信息
export const getUserInfoById = (id: number) => {
  return hyRequest.get({
    url: `/users/${id}`
  })
}
// 获取角色菜单树
export const getUserMenusByRoleId = (id: number) => {
  return hyRequest.get({
    url: `/role/${id}/menu`
  })
}
